<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateXunDianJiLuMingXiTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('xun_dian_ji_lu_ming_xi', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('xun_dian_ji_lu_id')->index()->comment('管理巡店记录id');
            $table->unsignedInteger('task_id')->index()->comment('管理任务id');
            $table->string("task_name")->comment("任务名称");
            $table->string("task_type")->comment("任务类型");
            $table->boolean('task_required')->default(false)->comment('是否必填项');
            $table->boolean('task_photo')->default(false)->comment('是否上传图片');
            $table->string("path")->nullable()->comment("图片地址");
            $table->string("value")->nullable()->comment("输入的值");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('xun_dian_ji_lu_ming_xi');
    }
}
